// import FastClick from 'fastclick';
// import { setErrorHandler } from '../utils/error';

// setErrorHandler();

// document.addEventListener('DOMContentLoaded', () => {
//   FastClick.attach(document.body);
//   // window.Raven.config('https://e732ae0607d04745aea163a76648a9b1@sentry.io/306844').install();
// }, false);

// 安卓微信禁止用户调整字体

function handleFontSize() {
  if (window.WeixinJSBridge) {
    // 设置网页字体为默认大小
    WeixinJSBridge.invoke('setFontSizeCallback', {
      fontSize: 0,
    });

    // 重写设置网页字体大小的事件
    WeixinJSBridge.on('menu:setfont', () => {
      WeixinJSBridge.invoke('setFontSizeCallback', {
        fontSize: 0,
      });
    });
  }
}

if (typeof WeixinJSBridge === 'object' && typeof WeixinJSBridge.invoke === 'function') {
  handleFontSize();
} else if (document.addEventListener) {
  document.addEventListener('WeixinJSBridgeReady', handleFontSize, false);
} else if (document.attachEvent) {
  document.attachEvent('WeixinJSBridgeReady', handleFontSize);
  document.attachEvent('onWeixinJSBridgeReady', handleFontSize);
}

